﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Clancy.Interfaces
{
    public enum ConnectionStatus
    {
        NotConnected,
        Conntecting,
        Connected,
        ConnectionFailed,
    }

    public interface IServerConnectionLogic
    {
        IObservable<ConnectionStatus> ConnectionStatus { get; }

        void AddNewSource(IVideoSourceFilterInfo videoSourceFilterInfo);

        Task<bool> Connect(IOperationAdapter operationAdapter);

        Task<bool> DeleteRecording(Guid selectedRecordingId);

        void Disconnect();

        ISurveilanceObject[] GetAllSurveilances();

        IEnumerable<IVideoSourceFilterInfo> GetAvailableSources();

        void RemoveSource(ISurveilanceObject surveilanceObject);

        Task<bool> StartVideostream(ISurveilanceObject surveilanceObject);

        Task StopVideostream(ISurveilanceObject surveilanceObject);

        Task<bool> UpdateSurveilanceObject(ISurveilanceObject surveilanceObject);

        Task<bool> UpdateSurveilanceObject(Guid surveilanceObject, string propertyName, object value);
    }
}